import request from "../utils/request";

export const queryAllDepts = ()=>request.get("/depts");

export const addDept = (data)=> request.post("/depts", data); //←增加保存部门的请求函数

export const getDeptById = (id) => request.get(`/depts/${id}`); //增加 根据id查询回显的请求函数
export const editDept = data=>request.put("/depts", data); //←根据id更新部门的 请求函数
export const deleteDeptById = id=>request.delete("/depts?id="+id);